//
//  BLEManager.h
//  Gas Monitor
//
//  Created by 郑青松 on 2017/10/30.
//  Copyright © 2017年 Mac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreBluetooth/CoreBluetooth.h>
#import "BleGasModel.h"

@interface BLEManager : NSObject<CBCentralManagerDelegate,CBPeripheralDelegate>
@property (nonatomic,strong)NSMutableArray *unConnectArray;
//可连接设备
@property (nonatomic,strong)NSMutableArray *connectedArray;
@property(nonatomic,assign)BOOL isConnected;
@property(nonatomic,assign)int reTime;

@property (nonatomic,strong)CBPeripheral *nowperipheral;

@property (nonatomic,copy)NSString *leakNString;
@property (nonatomic,copy)NSString *beginVString;
@property (nonatomic,copy)NSString *deviceName;
@property (nonatomic,strong)CBCharacteristic * characteristic3;


+ (instancetype)sharedBLEManager;
-(void)startScan;
-(void)connectWithDevice:(CBPeripheral *)device;
-(void)disConnectDevice;
// 写入的方法,新项目需要多个方法来对应多个写入操作(比如数据清零/关闭呼吸灯)
-(void)resetBeginValueWithBeginStr:(NSString *)beginStr LeakStr:(NSString *)leakStr;
@end
